from rest_framework import serializers

from app02.models import Books


class BooksSer(serializers.ModelSerializer):
    author = serializers.SlugRelatedField(slug_field='username',read_only=True)
    class Meta:
        model = Books
        fields = '__all__'
